﻿<Window x:Class="Trackr.SummaryWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:local="clr-namespace:Trackr.ViewModel"
        Title="{Binding Path=Name}" Height="400" MinHeight="400" Width="250" MinWidth="250" WindowStyle="None" BorderThickness="0"  Background="#F2F1EB">
	<!--<Window.DataContext>
		<local:SummaryViewModel />
	</Window.DataContext>-->
	<Window.Resources>
	</Window.Resources>
	<Grid Margin="5">
		<Grid.RowDefinitions>
			<RowDefinition Name="RowDefHeader" Height="40">
			</RowDefinition>
			<RowDefinition Name="RowDefContent" Height="*" />
		</Grid.RowDefinitions>
		
		<Grid Grid.Row="0" Name="stackPanelDayHeader" HorizontalAlignment="Stretch">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="*" />
				<ColumnDefinition Width="40" />
				<ColumnDefinition Width="40" />
				<ColumnDefinition Width="*" />
			</Grid.ColumnDefinitions>
			<TextBlock Grid.Column="0" Text="{Binding Path=CurrentDate, StringFormat=dddd}" ToolTip="{Binding Path=CurrentDate, StringFormat=yyyy-MM-dd}" Style="{StaticResource title}" HorizontalAlignment="Left" VerticalAlignment="Center" />
			<Button Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Command="{Binding ShowPreviousDay}" Style="{StaticResource TransparentButton}" Template="{StaticResource TransparentBtnTemplate}">
				<Label Content="&#xF060;" Style="{StaticResource iconFont}" />
			</Button>
			<Button Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center" Command="{Binding ShowNextDay}" Style="{StaticResource TransparentButton}" Template="{StaticResource TransparentBtnTemplate}"  >
				<Label Content="&#xF061;" Style="{StaticResource iconFont}" />
			</Button>
			<TextBlock Grid.Column="3" Text="{Binding Path=TotalDuration}" VerticalAlignment="Center" HorizontalAlignment="Right" Style="{StaticResource defaultFontSmall}" />
		</Grid>
		
		<ItemsControl Grid.Row="1" ItemsSource="{Binding Path=TimeItems}" BorderBrush="Transparent" Grid.IsSharedSizeScope="True" HorizontalContentAlignment="Stretch" ItemTemplate="{StaticResource SummaryItems}" />


	</Grid>
	<Window.InputBindings>
		<KeyBinding Key="Right" Command="{Binding ShowNextDay}" />
		<KeyBinding Key="Left" Command="{Binding ShowPreviousDay}" />
	</Window.InputBindings>
</Window>
